/**
 * Copyright (C), 2011-2016 The Store
 * File Name: AbstractListener.java
 * Encoding: UTF-8
 * Date: Feb 29, 2012
 * History: 
 */
package com.waynewan.qcomet.listener;

import java.util.concurrent.ExecutorService;

import javax.servlet.http.HttpServletResponse;

import org.apache.catalina.CometEvent;

import com.waynewan.qcomet.event.GenericEvent;

/**
 *
 * @author Wayne Wan(waynewan@mail.com)
 * @version Revision: 1.00 Date: Feb 29, 2012
 */
public abstract class AbstractListener implements QListener {

	protected ExecutorService threadPool;
	
	public AbstractListener(ExecutorService threadPool){
		this.threadPool = threadPool;
	}
	
	/* (non-Javadoc)
	 * @see com.waynewan.qcomet.listener.QListener#updated(com.waynewan.qcomet.event.GenericEvent)
	 */
	@Override
	public abstract void updated(GenericEvent event);
	
	public abstract void addConn(String clientId, CometEvent event,  HttpServletResponse conn);
	
	public abstract void removeConn(String clientId);
	
	public abstract int getConnSize();
}
